package com.tour.controller;

import com.tour.dao.TestDao;
import com.tour.service.TestService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName TestController
 * @Author 张梦兴
 * @Date 2020/3/5 23:19
 * @describe
 */
@RestController
public class TestController {
    Logger log= Logger.getLogger(TestController.class);
    @Autowired
    TestService service;
    @RequestMapping("/test")
    public Object test(){
        log.debug("=============dubug=========");
        log.info("==============info===========");
        log.info("==============error===========");
        Map<String,Object> map=new HashMap<>();
        map.put("1", "ssss");
        map.put("2", "dddd");
        map.put("3",service.getTest());
        log.debug(map);
        return map;
    }
}
